package csa_test

import (
	th "git.sr.ht/~mil/mobroute/src/csa_test/csa_testhelper"
	"git.sr.ht/~mil/mobroute/src/db"
)

var csaTestCaseBasic = CSATestCase{
	Test: "1: Takes shorter direct path (2) from a to c",
	Args: CSAArgs{
		Connections: th.ReorderByDepartureTime([]db.Connection{
			{ConnID: "1_0", TripID: "1", FromSSIDU: "a", ToSSIDU: "b", FromST: 3, ToST: 10},
			{ConnID: "1_1", TripID: "1", FromSSIDU: "b", ToSSIDU: "c", FromST: 10, ToST: 20},

			{ConnID: "2_0", TripID: "2", FromSSIDU: "a", ToSSIDU: "d", FromST: 0, ToST: 1},
			{ConnID: "2_1", TripID: "2", FromSSIDU: "d", ToSSIDU: "e", FromST: 1, ToST: 2},
		}),
		Transfers: &[]db.Transfer{},
		WalkcostsOrigin: map[string]uint{
			"a": 0, "b": 999, "c": 999, "d": 999, "e": 999,
		},
		FromTime:                1,
		ImplicitTransferSeconds: 2,
		MaxTransferSeconds:      3,
		MaxNTransfers:           99,
	},
	Expect: map[string]CSATestArrivalDetails{
		"a": {1, "", 0},
		"b": {10, "1_0", 1},
		"c": {20, "1_1", 1},
		"d": {1000, "", 0},
		"e": {1000, "", 0},
	},
}
